Skip to content

fix: small develop bugs (#709, #711)#714

Open
cailmdaley wants to merge 2 commits intodevelopfrom
fix/develop-bugs
Open

fix: small develop bugs (#709, #711)#714
cailmdaley wants to merge 2 commits intodevelopfrom
fix/develop-bugs

Conversation

@cailmdaley
Copy link
Copy Markdown
Contributor

@cailmdaley cailmdaley commented Apr 22, 2026

Two of the five issues filed against `develop` while reviewing PRs this week. Issues #710, #712, #713 are now resolved by other PRs (see notes).

Changes

Commit Issue File
`fix: align canfar_monitor docstring indentation` #709 `src/shapepipe/canfar/canfar_monitor.py`
`fix: add argparse to summary_run so -h shows help` #711 `src/shapepipe/summary_run.py`

Notes

#711 swapped to argparse rather than a 2-line `-h`/`--help` guard so `summary_run` gets real help output. Behavior is preserved: `patch` is still the required positional, `job_exclusive` is still optional, and `-v`/`--verbose` replaces the old `len(args) == 3` heuristic.

#712, #713 were originally addressed in this PR by adding astroquery/numba/fitsio + a `setuptools<81` pin to the Dockerfile. That commit was dropped on rebase because:

Closes #709, #711.

martinkilbinger pushed a commit to martinkilbinger/shapepipe-1 that referenced this pull request Apr 24, 2026
Closes CosmoStat#713.

The only functional use of sip_tpv in shapepipe was
`split_exp.create_hdus` calling `stp.pv_to_sip(h)` to rewrite each
per-CCD header's TPV distortion keywords as SIP before saving. Modern
astropy (>=5) parses TPV natively via WCSLIB, as do SExtractor, PSFEx,
and every other downstream WCS consumer in the pipeline, so the
keyword-level conversion was no longer buying us anything.

Removing the conversion lets us drop sip_tpv entirely — an unmaintained
2017 package whose v1.1 imports `pkg_resources` at module load and is
incompatible with setuptools>=81 (the underlying cause of the
ModuleNotFoundError in CosmoStat#713; PR CosmoStat#714's setuptools<81 pin is a symptom
workaround).

Changes:
- split_exp: remove sip_tpv import + pv_to_sip call; drop the now-dead
  `transf_coord` plumbing through `process` / `create_hdus`; update
  module docstring accordingly.
- Remove sip_tpv from `depends=[...]` in split_exp_runner,
  python_example_runner, and find_exposures_runner (the last was a
  spurious declaration — find_exposures_package never imported it).
- Drop sip_tpv from environment.yml, environment-dev.yml, Dockerfile,
  install_shapepipe, docs/source/dependencies.md, and the orphan
  shupe:12 BibTeX entry.
- New: `src/shapepipe/tests/test_split_exp.py` — three unittests that
  build a synthetic multi-CCD FITS with TPV distortion, run
  SplitExposures, and verify (1) per-CCD header WCS matches the source
  for several pixel samples, (2) the saved headers .npy round-trips
  pixel→world→pixel, (3) flag output uses int16.

`scripts/jupyter/wcs.ipynb` still imports sip_tpv; it's an exploratory
notebook last touched ~2.5 years ago and left alone.
7-space indent on the Params Default docstring opener caused
IndentationError at the 8-space body, breaking canfar_monitor,
canfar_submit_job, canfar_monitor_log, and canfar_run imports.

Closes #709
summary_run previously consumed sys.argv[1] as the 'patch' positional
without parsing, so 'summary_run -h' tried to create a directory
named '-h'. Switch to argparse: help/usage work, required patch is
enforced, optional job_exclusive and --verbose preserved.

Closes #711
@cailmdaley cailmdaley changed the title fix: small develop bugs (#709, #711, #712, #713) fix: small develop bugs (#709, #711) Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

canfar_monitor.py: IndentationError at line 55 breaks canfar_run and 3 entry points

1 participant